package com.chukun.disruptor.higher.chain;

import java.util.StringJoiner;

/**
 * 定义disruptor的Event对象
 */
public class Trade {

    private String tradeID;
    private String tradeName;
    private Double price;


    public String getTradeID() {
        return tradeID;
    }

    public void setTradeID(String tradeID) {
        this.tradeID = tradeID;
    }

    public String getTradeName() {
        return tradeName;
    }

    public void setTradeName(String tradeName) {
        this.tradeName = tradeName;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Trade.class.getSimpleName() + "[", "]")
                .add("tradeID='" + tradeID + "'")
                .add("tradeName='" + tradeName + "'")
                .add("price=" + price)
                .toString();
    }
}
